<?php  
namespace app\library\validate;
use think\Validate;

/**
 * 用户验证器
 * @package app\admin\validate
 */
class Area extends Validate{
    //定义验证规则
    protected $rule = [
        'areaname' 		 => 'require',
        'tag'     	     => 'requireIf:areatype,2|length:0,100',
    ];

    //定义验证提示
    protected $message = [
        'areaname.require'  => '请输入名称',
        'tag.requireIf'     => '标签不能为空',
        'tag.length'        => '标签长度不能大于100',
    ];

    //定义验证场景
    protected $scene = [

    ];
}
?>